{extend name="layout/read" /}
{block name="table"}
<table class="table">
	<thead>
		<tr>
			<th>字段</th>
			<th>值</th>  
		</tr>
	</thead>

	<tbody>

	<tr>
		<td>{$tables['fields']['id']['name']}</td>
		<td>{$info.id}</td>
	</tr>
	<tr>
		<td>{$tables['fields']['username']['name']}</td>
		<td>{$info.username}</td>
	</tr>
	<tr>
		<td>{$tables['fields']['fullname']['name']}</td>
		<td>{$info.fullname}</td>
	</tr>
	<tr>
		<td>{$tables['fields']['phone']['name']}</td>
		<td>{$info.phone}</td>
	</tr>
	<tr>
		<td>{$tables['fields']['email']['name']}</td>
		<td>{$info.email}</td>
	</tr>
	<tr>
		<td>{$tables['fields']['status']['name']}</td>
		<td>{$info.status}</td>
	</tr>

	<tr>
		<td>用户组</td>
		<td>
			{if !empty($info.groups)}
			{foreach $info['groups'] as $key=>$vo } 
			<span class="badge badge-pill badge-primary">
				{$vo['title']}
			</span>
			{/foreach}
			{/if}
		</td>
	</tr>

	<tr>
		<td>{$tables['fields']['create_time']['name']}</td>
		<td>{$info.create_time}</td>
	</tr>

	<tr>
		<td colspan="2">
			{if checkurl($now_route['controller'].'/edit')}
			<a href="{:url('edit',array('id'=>$info['id']))}" class="btn btn-primary" title="修改">
				<i class="fa fa-fw fa-lg fa-check-circle"></i>修改
			</a>
			{/if}
			{if checkurl($now_route['controller'].'/delete')}
			<a href="javascript:;" data-href="{:url('delete',array('id'=>$info['id']))}" class="btn btn-secondary delete" title="删除">
				<i class="fa fa-fw fa-lg fa-times-circle"></i>删除
			</a>
			{/if}
		</td>
	</tr>

	</tbody>
</table>
{/block}
